/** 比较返回数据 */
export function compareArrays(array1: Record<string, any>[], array2: Record<string, any>[], key: string) {
    const set1 = new Set(array1.map(item => item[key]))
    const set2 = new Set(array2.map(item => item[key]))

    const temp1 = [...array1].filter(item => !set2.has(item[key]))
    const temp2 = [...array2].filter(item => !set1.has(item[key]))
    console.log(temp1, temp2)

    return [
        [...array1, ...temp2],
        [...array2, ...temp1],
    ]
}
